<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<html>
 
 <head>
		<meta charset="utf-8" />
		<meta name="keywords" content="${bdictionaryPageInfo[0].name }">
		<meta name="description" content="${bdictionaryPageInfo[2].name }">
		<title>${bdictionaryPageInfo[1].name }</title>
		<link rel="stylesheet" href="${basePath }/resources/front/css/bootstrap.min.css" />
		<link rel="stylesheet" href="${basePath }/resources/front/css/public.css" />
		<link rel="stylesheet" href="${basePath }/resources/front/css/font-awesome.css" />
      	</head>
	<body>
		<#include "header.ftl">
		
		<div class="bignav">
			<div class="bood">
				<div class="listx">
					<div href="#" class="a-tltle">${Movie}</div>
					<ul>
						<#if bdictionaryByPrimary_list?exists> 
						   <#list bdictionaryByPrimary_list as list> 
							   <li><a href="${basePath }/public/search.html?type=${list.code}">${list.name}</a></li>
							</#list> 
						</#if>
					</ul>
				</div>
				<div class="listx">
					<div href="#" class="a-tltle">${TV}</div>
					<ul>
						<#if bdictionaryTVplay_list?exists> 
						   <#list bdictionaryTVplay_list as list> 
							   <li><a href="${basePath }/public/search.html?type=${list.code}">${list.name}</a></li>
							</#list> 
						</#if>
					</ul>
				</div>
				<div class="listx">
					<div href="#" class="a-tltle">${Comic}</div>
					<ul>
						<#if bdictionaryComic_list?exists> 
						   <#list bdictionaryComic_list as list> 
							   <li><a href="${basePath }/public/search.html?type=${list.code}">${list.name}</a></li>
							</#list> 
						</#if>
					</ul>
				</div>
			</div>			
		</div>
		<!--banner-->
		<div id="allAdverti" style="display:none">
		<#if banner1_list?exists> 
		   <#list banner1_list as list> 
			  ${list }
			</#list> 
		</#if>
		<#if banner2_list?exists> 
		   <#list banner2_list as list> 
			  ${list }
			</#list> 
		</#if>
		<#if banner3_list?exists> 
		   <#list banner3_list as list> 
			  ${list }
			</#list> 
		</#if>
		<#if banner4_list?exists> 
		   <#list banner4_list as list> 
			  ${list }
			</#list> 
		</#if>
		<#if rect1_list?exists> 
		   <#list rect1_list as list> 
			  ${list }
			</#list> 
		</#if>
		<#if rect2_list?exists> 
		   <#list rect2_list as list> 
			  ${list }
			</#list> 
		</#if>
		</div>
		<div class="banner">				
			<div class="pic">
				<div class="slider">
					<div class="bd">
					    <ul> 
						<#if banner_list?exists> 
						   <#list banner_list as list> 
							  <li><a target="_blank" href="${list.linkUrl}"><img ${list.target?if_exists} src="${baseImgPath}${list.imgUrl}"/></a>
							</#list> 
						</#if>
					    </ul>
					</div>
					<div class="pnBtn prev"> <span class="blackBg"></span> <span class="arrow"></span> </div>
					<div class="pnBtn next"> <span class="blackBg"></span> <span class="arrow"></span> </div>
				</div>
			</div>
		</div>
		<!--content-->
		<div class="all-bd">						
			<!--猜你喜欢-->
			<div class="enjoy">
				<ul class="title-style">
					<li class="li-enjoy">${Recommend}</li>
					<li>${like}</li>
				</ul>
			    <ul class="film-list film-one">
					<#if BSeries_list?exists> 
					   <#list BSeries_list as list> 
							<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1"> 
								<li>
									<img src="${baseImgPath}${list.cover}" alt="" />
									<p class="ptitle">${list.name}</p>
									<p class="pword">${list.description}</p>
								</li>
							</a>
						</#list> 
					</#if>
			    </ul>
			    
			    <ul class="film-list film-one" style='display:none'>
				<#if xihun_list?exists> 
					   <#list xihun_list as list> 
							<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1"> 
								<li>
									<img src="${baseImgPath}${list.cover}" alt="" />
									<p class="ptitle">${list.name}</p>
									<p class="pword">${list.description}</p>
								</li>
							</a>
						</#list> 
				</#if>
			    </ul>
			     
			</div>
			<!--激情预告-->
			<div class="enjoy">
				<p class="big-style">${Trailer}</p>
				<#if Trailer1?exists> 
							<a href="${basePath }/public/detail/show.html?seriesId=&setNum=&youkuId=${Trailer1.id}">
								<div class="big-introduce">
									<img src="${baseImgPath}${Trailer1.localCoverUrl}" alt="" />
									<p class="b-title">${Trailer1.title}</p>
									<p class="b-word">${Trailer1.introduction}</p>
								</div>
							</a>
				</#if>
			 
			  
			   <ul class="film-list film-list-four">
				<#if Trailer_list?exists> 
					   <#list Trailer_list as list> 
					   		<#if list_index!=0>
							<a href="${basePath }/public/detail/show.html?seriesId=&setNum=&youkuId=${list.id}">
								<li class="li-bottom">
									<img src="${baseImgPath}${list.localCoverUrl}" alt="" />
									<p class="ptitle">${list.title}</p>
									<p class="pword">${list.introduction}</p>    		
								</li>
							 </a>
							 </#if>
						</#list> 
				</#if>
			   </ul>
			    
			</div>
			
			<!--广告-->
			<div class="advier" id="adbanner1"></div>
			<div class="enjoy">
				<p class="big-style">${synchronization}</p>
					<#if Satellite1_list?exists> 
						   <#list Satellite1_list as list> 
								<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
									<div class="big-introduce">
										<img src="${baseImgPath}${list.poster}" alt="" />
										<p class="b-title">${list.name}</p>
										<p class="b-word">${list.description}</p>
									</div>
								</a>
							</#list> 
					</#if>
				<ul class="film-list film-list-three">
					<#if Satellite_list?exists> 
					   <#list Satellite_list as list> 
							<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
								<li class="li-bottom">
									<img src="${baseImgPath}${list.poster}" alt="" />
									<p class="ptitle">${list.name}</p>
									<p class="pword">${list.description}</p>
								</li>
							</a>
						</#list> 
					</#if>	
			    </ul>
			    <div class="paiming">
			    	<ul class="title-lei ws" id='title-one'>
						<li class="li-choose">${top}</li>
						<li>${movief}</li>
					</ul>  
			    	<div class='boox ws-one'>
									<ul>
										<#if play_list?exists> 
											<#list play_list as list> 
												<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
													<li <#if list_index==0>class="lione"</#if> >
													<#if list_index==0><span class="img-bc"><img width="230PX" height="129PX" src="${baseImgPath}${list.cover}" alt="" />
													<div class="zzc">					    					
								    				</div>
													</span>
													<span class="num number">${list_index+1 }</span>
													<span class="mcc word">${list.name }</span>
													</#if>
													<#if list_index!=0>
														<span class="img-bc display-none"><img width="230PX" height="129PX" src="${baseImgPath}${list.cover}" alt="" />
														<div class="zzc">					    					
								    					</div>
														</span>
														<span class="num">${list_index+1 }</span>
														<span class="mcc callname">${list.name }</span>
													</#if>
													</li>
												</a>	
											</#list> 
										</#if>
								    </ul>
					</div>
					<div class='boox ws-two' style='display:none'>
							<ul>
										<#if ByTvplay_list?exists> 
										   <#list ByTvplay_list as list> 
													<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
													<li <#if list_index==0>class="lione"</#if> >
													<#if list_index==0><span class="img-bc"><img width="230PX" height="129PX" src="${baseImgPath}${list.cover}" alt="" /></span>
													<span class="num number">${list_index+1 }</span>
													<span class="mcc word">${list.name }</span>
													</#if>
													<#if list_index!=0>
														<span class="img-bc display-none"><img width="230PX" height="129PX" src="${baseImgPath}${list.cover}" alt="" /></span>
														<span class="num">${list_index+1 }</span>
														<span class="mcc callname">${list.name }</span>
													</#if>
													</li>
													</a>
											</#list> 
										</#if>
					    	</ul>
							</div>		    	
					    	    <div class="guanggao" id="adrect1">
					    	    </div>
						    </div>
			</div>
			<!--日韩热播-->
			<div class="enjoy">
				<p class="big-style">${kjrb}</p>
				<#if Korea1_list?exists> 
				   <#list Korea1_list as list> 
						<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
							<div class="big-introduce">
								<img src="${baseImgPath}${list.poster}" alt="" />
								<p class="b-title">${list.name}</p>
								<p class="b-word">${list.description}</p>
							</div>
						</a>
					</#list> 
				</#if>
				<ul class="film-list film-list-four">
				<#if Korea_list?exists> 
				   <#list Korea_list as list> 
						<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
							<li class="li-bottom">
								<img src="${baseImgPath}${list.poster}" alt="" />
								<p class="ptitle">${list.name}</p>
								<p class="pword">${list.description}</p>
							</li>
						   
						</a> 
					</#list> 
				</#if>
			    </ul>
			</div>
			<!--美剧精选-->
			<div class="enjoy">
				<p class="big-style">${mjjx}</p>
				<ul class="film-list film-one">
				<#if American_list?exists> 
				   <#list American_list as list> 
						<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
								<li>
								<img src="${baseImgPath}${list.poster}" alt="" />
								<p class="ptitle">${list.name}</p>
								<p class="pword">${list.description}</p>
							</li>
						</a>
					</#list> 
				</#if>
			    </ul>
			</div>
			<div class="advier" id="adbanner2"></div>
			<!--佳品有约-->
			<div class="enjoy">
				<p class="big-style">${jpyy}</p>				
				<ul class="only">
				<#if Jiapin_list?exists> 
				   <#list Jiapin_list as list> 
						<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
							<li class="li-big">
								<div class="big-introduce">
									<img src="${baseImgPath}${list.poster}" alt="" />
									<p class="b-title">${list.name}</p>
									<p class="b-word">${list.description}</p>				    
								</div>
							</li>
						</a>
					</#list> 
				</#if>
				<#if ByJiapin_list?exists> 
				   <#list ByJiapin_list as list> 
						<a  href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
							<li  >
								<img src="${baseImgPath}${list.cover}" alt="" />
								<p class="c-title">${list.name}</p>
								<p class="c-word">${list.description}</p>
								<span class="bj">${db}</span>
							</li>
						</a>
					</#list> 
				</#if>			
				 
						<li class="li-zero">
						    <div class="paiming">
						    	<ul class="title-lei jp" id='title-two'>
									<li class="li-choose">${dyb}</li>
									<li>${movief}</li>
								</ul>
								<div class='boxx jp-one'>
									<ul>
										<#if Jiapinplay_list?exists> 
										   <#list Jiapinplay_list as list> 
												<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
													<li <#if list_index==0>class="lione"</#if> >
													<#if list_index==0><span class="img-bc"><img width="230PX" height="129PX" src="${baseImgPath}${list.cover}" alt="" /></span>
													<span class="num number">${list_index+1 }</span>
													<span class="mcc word">${list.name }</span>
													</#if>
													<#if list_index!=0>
														<span class="img-bc display-none"><img width="230PX" height="129PX" src="${baseImgPath}${list.cover}" alt="" /></span>
														<span class="num">${list_index+1 }</span>
														<span class="mcc callname">${list.name }</span>
													</#if>
													</li>
												</a>
											</#list> 
										</#if>	    	 
							    	</ul>
							    	<a href="#">
							    	</a>
								</div>
								<div class='boxx jp-two' style='display:none'>
									<ul>
										<#if LikeCount_list?exists> 
										   <#list LikeCount_list as list> 
												<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
													<li <#if list_index==0>class="lione"</#if> >
													<#if list_index==0><span class="img-bc"><img width="230PX" height="129PX" src="${baseImgPath}${list.cover}" alt="" /></span>
													<span class="num number">${list_index+1 }</span>
													<span class="mcc word">${list.name }</span>
													</#if>
													<#if list_index!=0>
														<span class="img-bc display-none"><img width="230PX" height="129PX" src="${baseImgPath}${list.cover}" alt="" /></span>
														<span class="num">${list_index+1 }</span>
														<span class="mcc callname">${list.name }</span>
													</#if>
													</li>
												</a>
											</#list> 
										</#if>	    	 
							    	</ul>
								</div>
							    	<a href="#">
							    	    <div class="guanggao" id="adrect2">
							    	    </div>
							    	</a>
						    </div>
						</li>	
					<#if LikeCount_list?exists> 
						   <#list LikeCount_list as list> 
								<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
									<li <#if (list_index + 1)%5==0>class="li-none"</#if> >
										<img src="${baseImgPath}${list.cover}" alt="" />
										<p class="c-title">${list.name}</p>
										<p class="c-word">${list.description}</p>
										<span class="bj">${db}</span>
									</li>
								</a>
							</#list> 
					</#if>
				</ul>
			</div>
			<!--院线大片-->
			<div class="enjoy">
				<p class="big-style">${yxdp}</p>
				<div class="btn-left">
					<img src="${basePath }/resources/front/img/left.png" alt="" />
				</div>
				<div class="only-out">
					<ul class="only only-scroll">
					<#if Cinema_list?exists> 
						   <#list Cinema_list as list> 
								<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
									<li>
										<img src="${baseImgPath}${list.poster}" alt="" />
										<p class="c-title">${list.name}</p>
										<p class="c-word">${list.description}</p>
										<span class="bj">${db}</span>
									</li>
								</a>
							</#list> 
					</#if>
					</ul>
				</div>
				
				<div class="btn-right">
					<img src="${basePath }/resources/front/img/right.png" alt="" />
				</div>
			</div>
			<div class="advier" id="adbanner3"></div>
			<!--动漫剧场-->
			<div class="enjoy">
				<p class="big-style">${dmjc}</p>
				<#if Animation_list?exists> 
						   <#list Animation_list as list> 
								<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
									<div class="big-introduce">
										<img src="${baseImgPath}${list.poster}" alt="" />
										<p class="b-title">${list.name}</p>
										<p class="b-word">${list.description}</p>
									</div>
								</a>
							</#list> 
				</#if>				
				<ul class="film-list film-list-four">
				<#if Mation_list?exists> 
						   <#list Mation_list as list> 
								<a href="${basePath }/public/detail/show.html?seriesId=${list.id}&setNum=1">
									<li class="li-bottom">
										<img src="${baseImgPath}${list.poster}" alt="" />
										<p class="ptitle">${list.name}</p>
										<p class="pword">${list.description}</p>
									</li>
								</a>
							</#list> 
				</#if>
			    </ul>
			</div>
			    <div class="advier" id="adbanner4"></div>
			<div class="enjoy">
				<p class="big-style">${hzhb}</p>
				<ul class="partner">
					<#if Target_list?exists> 
						   <#list Target_list as list> 
								<li><a target="_blank" href="${list.linkUrl}"><img src="${baseImgPath}${list.imgUrl}" height="100px" width="180px"/></a>
								</li>
							</#list> 
					</#if>
				</ul>
			</div>    
		   </div>
	
	    <!--footer-->
		<#include "footer.ftl">
	</body>
	<script type="text/javascript" src="${basePath }/resources/front/js/jquery-2.2.3.min.js" ></script>
    <script type="text/javascript" src="${basePath }/resources/front/js/jquery.SuperSlide2.js" ></script>
	
	<script>
		$('document').ready(function(){
			$(".film-list-four a:nth-child(3) li").attr
			$(document).scroll(function () {
				if($(document).scrollTop()>380){
				   $('.header').addClass('hearder-position');
				   $('.nav').show();
			    }else{
			    	$('.header').removeClass('hearder-position');
			    	$('.nav').hide();
			    	$('.nav-list').hide()
			    }
			})
			$('.nav').click(function(){
				$('.nav-list').toggle();
			});
			$('.jt').hover(function(){
				$('.banner-list').show();
			},function(){
				$('.banner-list').hide();
			});
			//banner页切换
			var allWidth=$(document).width(),
			    oneWidth=$('.slider .bd li img').width()
			    paddingWidth=(allWidth-oneWidth)/2;
			$('.slider').css('paddingLeft',paddingWidth);
			$('.slider').css('paddingRight',paddingWidth);
			$('.slider .tempWrap').css('paddingLeft',paddingWidth);
			$('.slider .tempWrap').css('paddingRight',paddingWidth);
			$('.slider .pnBtn').css('width',paddingWidth);
			//
			$('.title-style li').each(function(index){
				$(this).click(function(){
					$(this).addClass('li-enjoy').siblings().removeClass('li-enjoy');
					$(".film-one").css({"display":"none"});
			        $(".film-one").eq(index).css({"display":"block"});
				})				
			})
			$('.ws li').each(function(index){
				$(this).click(function(){
					$(this).addClass('li-choose').siblings().removeClass('li-choose');
					$(this).parent().siblings('.boox').css({"display":"none"});
			        $(this).parent().siblings('.boox').eq(index).css({"display":"block"});
				})				
			});
			$('.jp li').each(function(index){
				$(this).click(function(){
					$(this).addClass('li-choose').siblings().removeClass('li-choose');
					$(this).parent().siblings('.boox').css({"display":"none"});
			        $(this).parent().siblings('.boox').eq(index).css({"display":"block"});
				})				
			})
			//切换
			$('.ws-one ul li').each(function(index){
				$(this).mouseover(function(){
					$('.ws-one ul li').removeClass('lione');
					$(this).addClass('lione');
					$(this).parent().siblings().find('.img-bc').addClass('display-none');
					$(this).children('.img-bc').removeClass('display-none');
					$(this).parent().siblings().find('.num').removeClass('number');
					$(this).children('.num').addClass('number');
					$(this).parent().siblings().find('.mcc').removeClass('word').addClass('callname');
					$(this).children('.mcc').addClass('word');
					$(this).parent().siblings().find('.sjj').removeClass('jt');
					$(this).children('.sjj').addClass('jt');
				})
			})
			$('.ws-two ul li').each(function(index){
				$(this).mouseover(function(){
					$('.ws-two ul li').removeClass('lione');
					$(this).addClass('lione');
					$(this).parent().siblings().find('.img-bc').addClass('display-none');
					$(this).children('.img-bc').removeClass('display-none');
					$(this).parent().siblings().find('.num').removeClass('number');
					$(this).children('.num').addClass('number');
					$(this).parent().siblings().find('.mcc').removeClass('word').addClass('callname');
					$(this).children('.mcc').addClass('word');
					$(this).parent().siblings().find('.sjj').removeClass('jt');
					$(this).children('.sjj').addClass('jt');
				})
			})
			$('.jp-one ul li').each(function(index){
				$(this).mouseover(function(){
					$('.jp-one ul li').removeClass('lione');
					$(this).addClass('lione');
					$(this).parent().siblings().find('.img-bc').addClass('display-none');
					$(this).children('.img-bc').removeClass('display-none');
					$(this).parent().siblings().find('.num').removeClass('number');
					$(this).children('.num').addClass('number');
					$(this).parent().siblings().find('.mcc').removeClass('word').addClass('callname');
					$(this).children('.mcc').addClass('word');
					$(this).parent().siblings().find('.sjj').removeClass('jt');
					$(this).children('.sjj').addClass('jt');
				})
			})
			$('.jp-two ul li').each(function(index){
				$(this).mouseover(function(){
					$('.jp-two ul li').removeClass('lione');
					$(this).addClass('lione');
					$(this).parent().siblings().find('.img-bc').addClass('display-none');
					$(this).children('.img-bc').removeClass('display-none');
					$(this).parent().siblings().find('.num').removeClass('number');
					$(this).children('.num').addClass('number');
					$(this).parent().siblings().find('.mcc').removeClass('word').addClass('callname');
					$(this).children('.mcc').addClass('word');
					$(this).parent().siblings().find('.sjj').removeClass('jt');
					$(this).children('.sjj').addClass('jt');
				})
			})

			//tab切换
			
			//hover播放
			  $(".film-list li").hover(function(){
				$(this).children("p").css("color","#ED7500");
			  	$(this).append(" <div class='run'></div>");
			  	$('.run').append('<img src="${basePath }/resources/front/img/run.png" alt="" />')			    
			  },function(){
				$(this).children("p").css("color","");
			  	$(this).remove(".run");
			  	$('.run').remove();
			  });			  
			  $(".big-introduce").hover(function(){
				$(this).children("p").css("color","#ED7500");
			  	$(this).append(" <div class='run-big'></div>")	;		    
			    $('.run-big').append('<img src="${basePath }/resources/front/img/run.png" alt="" />')
			  },function(){
				$(this).children("p").css("color","");
			  	$(this).remove(".run-big");
			  	$('.run-big').remove();
			  });
			  $(".only li").hover(function(){
			  	var oHeight=$(this).children('img').height();
			  	var oWidth=$(this).children('img').width();
			  	if(oHeight==329&&oWidth==228){
			  		if($(this).append(" <div class='run-long'></div>")){
					    $('.run-long').append('<img src="${basePath }/resources/front/img/run.png" alt="" />');
					    $(this).children("p").css("color","#ED7500");
					}
			  	}					
			  },function(){
				  
			  	if($(this).remove(".run-long")){
			    	$('.run-long').remove();
			    	$(this).children("p").css("color","");
			    }
			  });
			  //scroll的长度
			  var scrollWidth=242*$('.only-scroll li').length-12;
			  var leftWidth=scrollWidth-1080;
			  $('.only-scroll').width(scrollWidth);
			  //scroll
			  $('.btn-left').hover(function(){
				  var nowLeft=parseInt($('.only-scroll').css('marginLeft'));
				    var timerRight=-nowLeft*10;
				  	$('.only-scroll').animate({marginLeft:0},timerRight,'linear');
			  	
			  },function(){
			  	$('.only-scroll').stop();
			  });
			  $('.btn-right').hover(function(){
				  var nowLeft=parseInt($('.only-scroll').css('marginLeft'));
				  	var lastWidth=leftWidth+nowLeft;
				    var timerLeft=lastWidth*10;
				  	$('.only-scroll').animate({marginLeft:-leftWidth},timerLeft,'linear');
			  },function(){
			  	$('.only-scroll').stop();
			  });
		});
		/* 把最后一个放到第一个前面，然后通过外层ul{margin-left:-630px !important; }来显示第一个 */
        jQuery(".slider .bd li").first().before( jQuery(".slider .bd li").last() );
        /* 控制左右按钮显示 */
        jQuery(".slider .pnBtn").hover(function(){ jQuery(this).find(".arrow").show() },function(){ jQuery(this).find(".arrow").hide() });
        /* 调用SuperSlide */
        jQuery(".slider").slide({ mainCell:".bd ul", effect:"leftLoop",  autoPlay:true, vis:3, mouseOverStop:false,interTime:5000 });
	
        /* function searchKeywords(obj){
        	
        	alert(11);
        } */
        
        $("#adbanner1").ready(function(){
        	adLoopTime("banner1");
        });
 		 $("#adbanner2").ready(function(){
 			adLoopTime("banner2");
        });
 		$("#adbanner3").ready(function(){
 			adLoopTime("banner3");
        });
 		$("#adbanner4").ready(function(){
 			adLoopTime("banner4");
        });
 		$("#adrect1").ready(function(){
 			adLoopTime("rect1");
        });
 		$("#adrect2").ready(function(){
 			adLoopTime("rect2");
        });
 		
        function adLoopTime(obj){
        	var banner1=$("."+obj);
			var length=banner1.length;
			if(banner1.eq(i).attr("status")=='null' || banner1.eq(i).attr("status")=='none' || length==0){
				$("#ad"+obj).css("display","none");
			}else{
				var interval=banner1.eq(0).attr("interval");
				if(length==1){
				var src=banner1.eq(0).find("img").attr("src");
    			var basepath="${baseImgPath}";
    			banner1.eq(0).find("img").attr("src",basepath+src);
				$("#ad"+obj).html(banner1.eq(0).prop("outerHTML"));
				banner1.eq(0).find("img").attr("count",interval);
				var i=0;
				setInterval(function(){ 
					if(i%interval==0){
        				var count=banner1.eq(0).find("img").attr("count");
        				banner1.eq(0).find("img").attr("count",parseInt(count)+parseInt(interval));
        			}
					i++
					if(i%300==0){
						adTimeInsert(banner1.eq(0).find("img"));
						banner1.eq(0).find("img").attr("count","0");
					}
				},1000);
				}else if(length>1){
					var i=0;
					var j=0;
					var basepath="${baseImgPath}";
					var src=banner1.eq(j%length).find("img").attr("src");
					banner1.eq(j%length).find("img").attr("src",basepath+src);
					$("#ad"+obj).html(banner1.eq(j%length).prop("outerHTML"));
					banner1.eq(0).find("img").attr("count",interval);
	        		setInterval(function(){
	        			if(i<length && i!=0){
		        			var src=banner1.eq(i%length).find("img").attr("src");
		        			src=banner1.eq(i%length).find("img").attr("src");
		        			banner1.eq(i%length).find("img").attr("src",basepath+src);
		        			
		        			}
	        			i++;
	        			if(i%interval==0){
	        				j++
	        				var count=banner1.eq(j%length).find("img").attr("count");
	        				banner1.eq(j%length).find("img").attr("count",parseInt(count)+parseInt(interval));
	        				$("#ad"+obj).html(banner1.eq(j%length).prop("outerHTML"));
	        			}
						if(i%300==0){
	        				for(var t=0;t<banner1.length;t++){
	        					adTimeInsert(banner1.eq(t).find("img"));
	        					banner1.eq(t).find("img").attr("count","0");
	        				}
							
						} 
						
						
	        		},1000);
	        		
	        	}
			}
        }
      
        
       
        function adTimeInsert(obj){
        	var $this=$(obj);
        	var params={};
        	params["adpositionCode"]=$this.attr("pcode");
        	params["adpositionName"]=$this.attr("pname");
        	params["adResourceId"]=$this.attr("adid");
        	params["adResourceTitle"]=$this.attr("adtitle");
        	params["adTypeName"]=$this.attr("adtypename");
        	params["adTypeCode"]=$this.attr("adtype");
        	params["type"]="b";
        	params["count"]=$this.attr("count");
        	$.ajax({
    			type:"post",
    			data:params,
    			url:"${basePath }/public/addAdRecord.html",
    			
    		});
        }
        function wordsinsert(obj){
        	var $this=$(obj);
        	var params={};
        	params["adpositionCode"]=$this.attr("pcode");
        	params["adpositionName"]=$this.attr("pname");
        	params["adResourceId"]=$this.attr("adid");
        	params["adResourceTitle"]=$this.attr("adtitle");
        	params["adTypeName"]=$this.attr("adtypename");
        	params["adTypeCode"]=$this.attr("adtype");
        	params["type"]="d";
        	params["count"]="1";
        	$.ajax({
    			type:"post",
    			data:params,
    			url:"${basePath }/public/addAdRecord.html",
    			
    		});
        }

        </script>

</html>
